﻿using EaseDapper.Constants;
using System;
using System.Collections.Generic;
using System.Text;

namespace EaseDapper
{
    public class DatabaseOptionsBuilder
    {
        private readonly DatabaseOptionsBuilder _option;
        public DatabaseOptionsBuilder Option => _option;

        public DatabaseOptionsBuilder()
        {

        }

        public DatabaseOptionsBuilder(DatabaseOptionsBuilder option)
        {
            _option = option;
        }

        public DatabaseOptionsBuilder InitConfig()
        {
            GlobalDatas.Config = new ConnectConfig();
            return this;
        }

        public DatabaseOptionsBuilder SetDbType(string type)
        {
            GlobalDatas.Config.DbType = type;
            return this;
        }

        public DatabaseOptionsBuilder SetConnectionString(string connect)
        {
            GlobalDatas.Config.ConnectString = connect;
            return this;
        }
    }
}
